package com.drug.service.impl;

import com.drug.domain.Manufacturer;
import com.drug.domain.Result;
import com.drug.mapper.ManufacturerMapper;
import com.drug.service.ManufacturerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ManufacturerServiceImpl implements ManufacturerService {

    @Autowired
    private ManufacturerMapper manufacturerMapper;


    /**
     * 查询所有的生产企业
     * @return
     */
    @Override
    public Result selectAll() {
        Result result = new Result();
        List<Manufacturer> manufacturers = manufacturerMapper.selectAll();
        result.setData(manufacturers);
        return result;
    }
}
